<template>
  <div class="Model">
    <ul>
      <li>
        <div class="top">
          <img :src="brand.list_pic_url" width="100%" height="150px" alt />
          <div class="top_title">{{brand.name}}</div>
        </div>
        <div class="footer">
          <p>{{brand.simple_desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>
 
<script>
import { BrandDetailApi } from "../request/api";
export default {
  data() {
    return {
      brand: {},
    };
  },
  created() {
    // 多写点注释
    BrandDetailApi({
      id: this.$route.params.id,
    }).then((res) => {
      console.log(res);
      if (res.errno == 0) {
        this.brand = res.data.brand;
      }
    });
  },
};
</script>
 
<style lang = "less" scoped>
.Model {
  background: #efefef;
  .top {
    position: relative;
    width: 100%;
    height: 150px;
    .top_title {
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
      font-size: 20px;
      color: #fff;
      text-decoration: underline;
    }
  }
  .footer {
    font-size: 18px;
    padding: 20px 2%;
    background: #fff;
    color: #666;
    text-align: center;
  }
}
</style>